package cn.yangliu.webflux.repository;

import java.util.List;

import cn.yangliu.webflux.entity.User;
import cn.yangliu.webflux.entity.UserDto;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author 杨柳
 * @contact 
 * @date 2019-05-15 23:06
 */
@Repository
public interface UserRepository extends BaseRepository<User,Long> {

    @Query(value = "SELECT new cn.yangliu.webflux.entity.UserDto(username,createTime) FROM User")
    List<UserDto> list();

}
